In messaging systems, the use of messages and message queues in a wider network provide an asynchronous communications protocol, which means that the sender (a producing application) and the receiver (a consuming application) of a message do not need to interact with a message queue at the same time. Messages placed onto a queue are stored until a recipient retrieves them. Such networks support the passing of messages between different computer systems, connecting multiple applications and multiple operating systems. Messages can also be passed from queue to queue in order for a message to reach the ultimate desired recipient. An example of a commercial implementation of such a messaging software is IBM's WebSphere® MQ, previously MQSeries®. (IBM, WebSphere and MQSeries are trademarks of International Business Machines in the United States, other countries, or both.)
Message-oriented middleware usually offers a once-and-once-only delivery quality of service. It can be difficult and expensive to implement this quality of service in a high-throughput high-availability configuration because a component (e.g., a queue manager) which delivers the messages to a client is a single point of failure. If a component within the delivering mechanism is duplexed (or more), then complex synchronization protocols are required for preventing double (or more) delivery of the same message. Once-and-once-only delivery is usually only required when the message recipient (the consuming application) performs some work that must be done once-and-once-only. Typically, such consuming applications are transactional and include the middleware's delivering component as a resource manager in their transactions.
One high availability message transmission system of the art uses at least one of a plurality of message transmitters to achieve high availability message transmission. The plurality of message transmitters are each operable to transmit a message to a subscriber. In accordance with a determination, for example, of the value of the connections, the message is copied and transmitted to the plurality of the message transmitters so that at least one of the plurality of message transmitters transmits the copy to the subscriber. The at least one message transmitter may be selected by analyzing the message and determining an associated rule based on characteristics of the message. This system provides duplexing within the message delivery mechanism.
It is apparent that duplexing a delivering component within a transaction inevitably requires a distributed two-phase commit transaction even if no other resource managers are involved. Additional complexities arise in the middleware because either both (or more) of the delivering components themselves need to receive their copy of each message exactly simultaneously (that is, within a distributed two-phase commit transaction), or the delivering components need to keep track of messages which they have not yet received but which they have (in effect) already delivered. There are several known designs for high-throughput high-availability message-oriented middleware that resolve these issues by having a consumer-side component (e.g., a client) that detects and discards any second or subsequent delivery of the same message, as discussed above. However, these designs require the consumer-side component to track which messages the consuming application has already processed.